﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XCrawler
{
    /// <summary>
    /// 爬虫异常事件
    /// </summary>
    public class OnErrorEventArgs
    {
        /// <summary>
        /// 爬虫作业地址
        /// </summary>
        public Uri Uri { get; set; }

        /// <summary>
        /// 爬虫解析信息包, 
        /// 包含HTTP返回信息, 
        /// 包含字典信息可任意增加修改, 
        /// </summary>
        public ParserBag ParserBag { get; private set; }

        /// <summary>
        /// 异常信息
        /// </summary>
        public Exception Exception { get; set; }

        public OnErrorEventArgs(Uri uri, ParserBag parserBag, Exception exception) {
            this.Uri = uri;
            this.Exception = exception;
            this.ParserBag = parserBag;
        }

      
    }
}
